{include file="common/header.tpl"}
<section class="main">
	<nav class="left-col">{include file="common/navi-system.tpl"}</nav>
    <article class="right-col">
    	<h2><a href="{$back}">Danh sách ROLE</a> &raquo; Cập nhật</h2></li>                    
        <form name="frmAdd" id="frmAdd" method="post" enctype="multipart/form-data" action="{$smarty.const.HOST_BACKEND}section/saveedit" class="ui">
            <input type="hidden" name="psectionid" id="psectionid" value="{$row.sectionid}" />
            <ul>
                {if isset($smarty.session.SECTION_ERROR)}
                    <li class="error">
                        {include file="common/error.tpl" dataSession=$smarty.session.SECTION_ERROR}
                    </li>
                {/if}
                <li>
                    <label for="pname">Tên<span class="required">*</span>:</label>
                    <div class="txt">
                    	<input type="text" class="text" name="pname" id="pname" value="{if isset($smarty.session.section_p.pname)}{$smarty.session.section_p.pname|escape}{else}{$row.name|escape}{/if}" />
                    </div>
                </li>  
                <li>
                    <label for="penabled">Tình trạng:</label>
                    <div class="sel">
                        <select name="penabled" id="penabled">
                            {if isset($smarty.session.section_p.penabled)}
                                {html_options options=$arrEnable selected=$smarty.session.section_p.penabled}
                            {else}
                                {html_options options=$arrEnable selected=$row.enabled}
                            {/if}
                        </select>
                	</div>
                </li>                          
                <li>
                    <label for="pperm_a">Quyền sử dụng:</label>
                    <div class="sel">
                        <select name="pperm_a" id="pperm_a">
                            {if isset($smarty.session.section_p.pperm_a)}
                                {html_options options=$arrPermA selected=$smarty.session.section_p.pperm_a}
                            {else}
                                {html_options options=$arrPermA selected=$row.perm_a}
                            {/if}
                        </select>
                    </div>
                </li>
                <li>
                    <button type="submit"><strong>Lưu dữ liệu</strong></button>
                    <button type="button" onclick="javascript:document.location.href='{$back}'" class="cancel"><strong>Hủy</strong></button>
                </li>
            </ul>
        </form>
     </article>
</section>
{include file="common/footer.tpl"}
                
